<?php

require_once './config.php';

$xuhaos = json_decode($_REQUEST['arr']);

$arr = array();

for($i = 0; $i < count($xuhaos); $i++){
    $xuhao = $xuhaos[$i];
    $sql = "SELECT * FROM jiagou WHERE xuhao = $xuhao";
    $result = mysqli_query($conn,$sql);
    $data = mysqli_fetch_assoc($result);
    $arr[] = $data;
};
echo json_encode(array(
    'code' => 1,
    'data' => $arr
));